package Day03;

import java.util.Scanner;

public class IfDemo {
    public static void main(String[] args) {
       /* int num =5;
        if (num%2==0){
            System.out.println(num+"是偶数");
        }
        System.out.println("继续执行");

        */

        //满500打八折
        /*double price =600.0;//消费金额
        if (price>=500){
            price=price*0.8;
        }
        System.out.println("最终消费金额为："+price);

         */
        Scanner scanner=new Scanner(System.in);
       System.out.println("请输入你的年龄：");
        int age=scanner.nextInt();
        if (age>=18&&age<=50){
            System.out.println("年龄满足条件");
        }else if(age<18){
            System.out.println("不满足条件哦！你太小了");
        }else {
            System.out.println("你太老了，下辈子再来吧");
        }
    }
}
